/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  4 Jun 2008 10:29:33 am

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.11

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

#ifndef __JUCER_HEADER_FORMELEMENT_FORMELEMENT_77121E8C__
#define __JUCER_HEADER_FORMELEMENT_FORMELEMENT_77121E8C__

//[Headers]     -- You can add your own extra header files here --
#include "juce.h"
class KetonalFormEditor;
//[/Headers]



//==============================================================================
/**
                                                                    //[Comments]
    An auto-generated component, created by the Jucer.

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class formElement  : public Component,
                     public ComboBoxListener,
                     public ButtonListener
{
public:
    //==============================================================================
    formElement (KetonalFormEditor *_p, int i);
    ~formElement();

    //==============================================================================
    //[UserMethods]     -- You can add your own custom methods in this section.
	void setRemove();
	bool getRemove();
	void setIndex (int i);
	XmlElement *getXmlElement();
	void setXmlData();
	void setXmlData (XmlElement *e);
    //[/UserMethods]

    void paint (Graphics& g);
    void resized();
    void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
    void buttonClicked (Button* buttonThatWasClicked);

    // Binary resources:
    static const char* listremove_png;
    static const int listremove_pngSize;

    //==============================================================================
    juce_UseDebuggingNewOperator

private:
    //[UserVariables]   -- You can add your own custom variables in this section.
	KetonalFormEditor *parent;
	int index;
	bool shouldBeRemoved;
	XmlElement *elm;
    //[/UserVariables]

    //==============================================================================
    GroupComponent* groupComponent;
    ComboBox* formFieldType;
    TextEditor* formFieldName;
    TextEditor* formFieldValue;
    ImageButton* removeFormElement;

    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    formElement (const formElement&);
    const formElement& operator= (const formElement&);
};


#endif   // __JUCER_HEADER_FORMELEMENT_FORMELEMENT_77121E8C__
